import request from '@/utils/request'

// 查询sportsman列表
export function listSportsman(query) {
    return request({
        url: '/training/sportsman/list',
        method: 'get',
        params: query
    })
}

export function listSportsmanCountByType() {
    return request({
        url: '/training/sportsman/listSportsmanCountByType',
        method: 'get',
    })
}

// 查询sportsman详细
export function getSportsman(id) {
    return request({
        url: '/training/sportsman/' + id,
        method: 'get'
    })
}

// 新增sportsman
export function addSportsman(data) {
    return request({
        url: '/training/sportsman',
        method: 'post',
        data: data
    })
}

// 修改sportsman
export function updateSportsman(data) {
    return request({
        url: '/training/sportsman',
        method: 'put',
        data: data
    })
}

// 删除sportsman
export function delSportsman(id) {
    return request({
        url: '/training/sportsman/' + id,
        method: 'delete'
    })
}

// 导出sportsman
export function exportSportsman(query) {
    return request({
        url: '/training/sportsman/export',
        method: 'get',
        params: query
    })
}